<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="demo">

    </div>
    <script src="../js/vue.js"></script>
    <script>
        /* 
        生命周期分为三个阶段
        初始阶段
            -beforeCreate()
            -created()
            -beforeMount()
            -mounted()
        更新阶段
            -beforeUodata()
            -updataed()
        销毁阶段
            -beforeDestroy()
            -destroyed()
        */
        new Vue({
            data:{
                data:{
                    isShow:true,
                }
            },
            // Vue实例已经产生但是没有进行初始化操作
            beforeCreate(){
                console.log("beforeCreate()");
            }, 
            created(){
                console.log("created()");
            },
            beforeMount(){
                console.log("beforeMount()");
            },
            mounted(){
                console.log("mounted()");
            },
            beforeDestroy(){
                console.log("beforeDestroy(){}");
            },
            bestroyed(){
                console.log("bestroyed(){}");
            }
        }).$mount("#demo")
    </script>
</body>
</html>